import {Box, BoxProps, Grow, Paper} from "@mui/material";
import {FC, ReactNode} from "react";

interface DGGrowViewProps extends BoxProps {
    children?: ReactNode;
    time?: number;
}

const DGGrowView: FC<DGGrowViewProps> = ({children, time, ...other}) => {
    return (<Grow
        in={true} style={{
        background: "none",
        boxShadow: "none",
        transformOrigin: '50% 0 0'
    }} {...{timeout: time}}>
        <Paper sx={{
            background: "none",
            boxShadow: "none",
            boxShadowOffsetX: 0,
            boxShadowOffsetY: 0
        }}>
            <Box {...other}>{children}</Box>
        </Paper>
    </Grow>);
}
export default DGGrowView;